<template>
  <div>
    <a-layout>
      <a-layout-sider width="200" style="background: #fff">
        <a-menu
          mode="inline"
          :default-selected-keys="['/post']"
          :style="{ height: '100%', borderRight: 0 }"
          @click="onClickroutes"
        >
          <a-menu-item key="/post">
            <a-icon type="user" />
            <span>后台首页</span>
          </a-menu-item>
          <a-menu-item key="/photo">
            <a-icon type="video-camera" />
            <span>相册管理</span>
          </a-menu-item>
          <a-menu-item key="/productlist">
            <a-icon type="upload" />
            <span>商品列表</span>
          </a-menu-item>
        </a-menu>
      </a-layout-sider>

      <a-layout style="padding: 0 24px 24px">
        <a-layout-content
          :style="{
            background: '#fff',
            padding: '24px',
            margin: 0,
            minHeight: '280px',
          }"
        >
          <router-view />
        </a-layout-content>
      </a-layout>
    </a-layout>
  </div>
</template>

<script>
export default {
   methods: {
    onClickroutes(props) {
      this.$router.push(props.key);
    },
  },
};
</script>

<style>
</style>